package org.jeecg.modules.order.service;

import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.coupon.entity.MyCoupon;
import org.jeecg.modules.order.entity.Order;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.voucher.entity.Voucher;

import java.util.List;
import java.util.Map;

/**
 * @Description: 订单
 * @Author: jeecg-boot
 * @Date:   2024-05-19
 * @Version: V1.0
 */
public interface IOrderService extends IService<Order> {

    int backMoney(Order order);

    Order doOrder4Coupon(LoginUser sysUser,Order order, MyCoupon myCoupon);

    void doOrder(LoginUser sysUser, Order order, Voucher voucher);

    void back4WxPay(Order order,Float backMoney);

    void back4Balance(Order order, Float backMoney);

    void back4Coupon(Order order, Float backMoney,int leftHours,int leftDays);

    List<Map> topnUser();

    List<Map> topnSeat();

    Result<String> payOrder(String userId, String orderNum) throws Exception;

    Result<String> addOrder(LoginUser sysUser,Order order) throws Exception;

    Result<String> editOrder(LoginUser sysUser,Order order) throws Exception;

}
